package com.joker.demo.controller;


import com.joker.demo.service.HelloAiService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 大模型入口
 * @author : feixiang.li
 * @since : 2025-09-25 16:14
 */
@RestController
@RequestMapping("/aiService")
public class AiServiceController {

    private final HelloAiService helloAiService;

    public AiServiceController(HelloAiService helloAiService) {
        this.helloAiService = helloAiService;
    }

    @RequestMapping("/hello")
    public String hello(@RequestParam(value = "question", defaultValue = "你是谁") String question) {
        String hello = helloAiService.hello(question);
        System.out.println(hello);
        return hello;
    }
}
